#!/bin/sh

cd "$MBS_ROOT"

export SSSSSS_STORAGE=/var/ssssss
mkdir -p "$SSSSSS_STORAGE"
chown musicbrainz:musicbrainz "$SSSSSS_STORAGE"

export HOME=/home/musicbrainz
exec chpst -u musicbrainz:musicbrainz \
    carton exec -- plackup --port 5050 -r contrib/ssssss.psgi 2>&1
